Eclipse Platform
Pre-release 3.0

org.eclipse.team.core.subscribers
Class RemoteSynchronizer

java.lang.Object
  extended byorg.eclipse.team.core.subscribers.RemoteSynchronizer
Direct Known Subclasses:
RemoteBytesSynchronizer

public abstract class RemoteSynchronizer
extends Object

A remote synchronizer provides API to access a handle for a resource resource associated with a local resource (that may or may not exist locally). API is also provided to trigger a refresh in order to cache the remote state for later retrieval.


Constructor Summary
RemoteSynchronizer()
           
 
Method Summary
abstract  IRemoteResource getRemoteResource(IResource resource)
          Return a remote resource handle created from the remote sync bytes associated with the local resource for this synchronizer.
abstract  boolean hasRemote(IResource resource)
          Return whether the given resource has a corresponding remote resource that is known to exist (at the last point in time that a refresh was performed).
abstract  IResource[] refresh(IResource resource, int depth, boolean cacheFileContentsHint, IProgressMonitor monitor)
          Refreshes the contents of the resource synchronizer and returns the list of resources whose remote synchronization state changed since the last refresh.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteSynchronizer

public RemoteSynchronizer()
Method Detail

getRemoteResource

public abstract IRemoteResource getRemoteResource(IResource resource)
                                           throws TeamException
Return a remote resource handle created from the remote sync bytes associated with the local resource for this synchronizer.

Parameters:
resource - the local resource
Returns:
the IRemoteResource handle for a remote resource
Throws:
TeamException

hasRemote

public abstract boolean hasRemote(IResource resource)
                           throws TeamException
Return whether the given resource has a corresponding remote resource that is known to exist (at the last point in time that a refresh was performed).

Parameters:
resource - the local resource handle
Returns:
true if a corrrespondin remote resource is know to exist
Throws:
TeamException

refresh

public abstract IResource[] refresh(IResource resource,
                                    int depth,
                                    boolean cacheFileContentsHint,
                                    IProgressMonitor monitor)
                             throws TeamException
Refreshes the contents of the resource synchronizer and returns the list of resources whose remote synchronization state changed since the last refresh. The cacheFileContentsHint indicates that the user of this synchronizer will be using the file contents. Subclasses can decide whether to cache file contents during the refresh or to allow them to be fetched when request.

Parameters:
resource - the resource to refresh
depth - the depth of the operation
cacheFileContentsHint - a hint which indicates whether file contents will be used
monitor - the progress monitor
Returns:
the resources whose remote has changed since the last refresh
Throws:
TeamException

Eclipse Platform
Pre-release 3.0

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.